package bmatch.tech.file.model;

/**
 * Response的注释
 *
 * @author: Awake
 * @date: 2018-12-02 12:00
 **/
public class Response {
    public static final int RESPONSE_OK = 200;
    public static final int RESPONSE_BAD_REQUEST = 400;
    public static final int RESPONSE_SERVER_ERROR = 500;

    /**
     * 响应码
     */
    private int code;

    /**
     * 响应信息
     */
    private String message;

    /**
     * 其他数据
     */
    private Object data;

    public Response(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public Response() {
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "Response{" +
                "code=" + code +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
